<template>
  <div class='ls-support'>
    <p class="title">
      <img :src="icons" alt="pic" class="fr active" @click="toAdd">
      <span @click="showAcheet">{{title}} <van-icon name="arrow-down" class="arrow-down" /></span>
    </p>
    <List :listData="listData.subsidizeInfo||columns" @forMore="getMoreInfo">
      <ListModel :listData="listData.subsidizeInfo" :routerDetail="routerDetail" />
    </List>
  </div>
</template>
<script>
import MixIns from '../../../../mixin/mixin.js'
import List from '../../../../components/list.vue'
import ListModel from './model/list'
export default {
  components: {List,ListModel},
  name: "",
  data() {
    return {
      title:"全部",
      icons:require('../../../../assets/images/home/lifeserve/icon-setting.png'),
      searchInfo:{
        type:0,
      },
      columns:[]
    };
  },
  methods: {
    showAcheet(){
      this.$store.state.dias.acheet.show=true
      this.$store.state.dias.acheet.columns=["全部",...this.listData.typeInfo.map(val=>val.type)]
      this.$store.state.dias.acheet.confirm=this.confirm
    },

    toAdd(){
      _g.toMessage({error:2,msg:"升级中..."})
    },

    confirm(val){
      this.title=val
      this.$store.state.dias.acheet.show=false
      this.searchInfo.type=val==="全部"?0:this.listData.typeInfo.find(val=>val.type).id
      this.getListData()
    }
  },
  created() {},
  mixins:[MixIns]
};
</script>
<style lang="scss" scoped>
.ls-support {
  .title{
    font-size: 16px;
    color: #fff;
    line-height: 80px;
    height: 80px;
    background-color: #00998d;

    >img{
      width: 40px;
      height: 40px;
      margin-top: 20px;
      margin-right: 20px;
    }
    >img:active{
      background-color: transparent;
    }

    span{
      margin-left: 25px;
    }
  }
  .arrow-down{
    transform: translateY(2.5px)
  }
}
</style>